#include <Arduino.h>
#define LED 22

void setup()
{
  Serial.begin(115200);
  pinMode(LED,OUTPUT);
}

void loop()
{
  if(Serial.available())//*当串口有信号时
  {
    Serial.write(Serial.read());
    digitalWrite(LED,HIGH);
    delay(100);
  }
  digitalWrite(LED,LOW);//灯亮

}
